#include "StdAfx.h"
#include "voip_reg_msg_impl.h"
#include "dll_object.h"

voip_reg_msg_impl::voip_reg_msg_impl(const void* p_sipx_line_info /* = NULL */)
{
	if ( p_sipx_line_info )
	{
		sipxDuplicateEvent(EVENT_CATEGORY_LINESTATE, p_sipx_line_info, &this->p_line_info);
		this->res = aot::voip::e_voip_reg_success;
		this->token = ((SIPX_LINESTATE_INFO*)this->p_line_info)->szSipCallInfoText;
	}
	else
	{
		this->p_line_info = NULL;
		this->res = aot::voip::e_voip_reg_fail;
		this->token = NULL;
	}
}

voip_reg_msg_impl::~voip_reg_msg_impl()
{
	if ( this->p_line_info )
	{
		sipxFreeDuplicatedEvent(EVENT_CATEGORY_LINESTATE, this->p_line_info);
	}
}

 